<template>
  <el-dialog :visible.sync="gkmxDialog" :close-on-click-modal="false" :before-close="gkmxCancel" append-to-body :fullscreen="gkmxDialog" @close="gkmxCancel">
    <div class="app-container">
      <!--工具栏-->
      <div class="head-container">
        <div>
          <!-- 搜索 -->
          <el-input v-model="query.blurry" clearable size="small" placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
          <rrOperation />
        </div>
      </div>
      <!--表格渲染-->
      <el-table
        ref="gkmxTable"
        v-loading="crud.loading"
        :data="crud.data"
        size="small"
        style="width: 100%;"
        @selection-change="crud.selectionChangeHandler"
      >
        <el-table-column type="selection" width="55" />
        <el-table-column prop="bisRyglXm" label="姓名" />
        <el-table-column prop="bisRyglXb" label="性别">
          <template slot-scope="scope">
            {{ dict.label.xb[scope.row.bisRyglXb] }}
          </template>
        </el-table-column>
        <el-table-column prop="bisRyglLxdh" label="联系电话" />
        <el-table-column prop="bisRyglZjhm" label="身份证" />
        <el-table-column prop="bisRyglZjlb" label="专家类别">
          <template slot-scope="scope">
            {{ dict.label.pgrylb[scope.row.bisRyglZjlb] }}
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </el-dialog>
</template>

<script>
import crudPgry from '@/api/business/pgry'
import crudFpry from '@/api/business/fpry'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'

const defaultForm = { bisRyglId: null, bisRyglUserId: null, bisPggsId: null, bisRyglXm: null, bisRyglXb: null, bisRyglLxdh: null, bisRyglZjlx: '居民身份证', bisRyglZjhm: null, bisRyglJj: null, bisRyglYbqh: null, bisRyglYhdl: null, bisRyglKhhmc: null, bisRyglKhhid: null, bisRyglYhzh: null, bisRyglYhhm: null, bisRyglZjlb: null, bisRyglZjjszc: null, bisRyglXrzw: null, bisRyglZjks: null, bisRyglYzbm: null, bisRyglDzyx: null }
export default {
  name: 'Pgry',
  // eslint-disable-next-line vue/no-unused-components
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  dicts: ['xb', 'rylx', 'pgrylb', 'zjlx'],
  cruds() {
    return CRUD({ title: '评估人员', url: this.url, idField: 'bisRyglId', sort: 'bisRyglId,desc', crudMethod: { ...crudPgry, crudFpry }})
  },
  data() {
    return {
      zjlx: '01',
      PgryDialog: 0,
      selectedZhids: [],
      selectedPgrys: [],
      submitProcessing: false,
      gkmxDialog: false,
      url: ''
    }
  },
  created() {

  },
  methods: {
    gkmxCancel() {
      this.gkmxDialog = false
    },
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      return this.gkmxDialog
    }
  }
}
</script>

<style scoped>

</style>
